/*
 * AvoidObstacleAction.h
 *
 *  Created on: 17/lug/2014
 *      Author: va2013
 */

#ifndef AVOIDOBSTACLEACTION_H_
#define AVOIDOBSTACLEACTION_H_
#include <Aria.h>
#include <ArAction.h>
#include <iostream>
#include <opencv2/opencv.hpp>
//#include <opencv/cv.h>
//#include <opencv/highgui.h>
using namespace std;

class AvoidObstacleAction: public ArAction {
private:
	bool* mustRealign;
	double turningTime;
	int rotationVel;
	int actualRotVel;
	int direction;
	ArActionDesired myDesired;
	ArRobot* robot;
	//double startingHeading;
	double startTime;

	bool achievedCurve;
	bool init;

public:
	AvoidObstacleAction(ArRobot* r, double turningTime, int rotVel, bool* mustRealign);

	virtual ~AvoidObstacleAction();
	ArActionDesired* fire(ArActionDesired currentDesired);
	void setDeltaHeading(double turningTime, int direction);
	bool haveAchievedCurve();
};

#endif
